package com.zhuangjie.coupon.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zhuangjie.coupon.pojo.CouponBatchAndLink;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhuangjie
 * @since 2024-02-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("coupon_product")
@ApiModel(value = "CouponProduct对象", description = "")
public class CouponProduct implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("卷商品id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty("优惠（价格上减去优惠价格）")
    @TableField("preferential")
    private BigDecimal preferential;

    @ApiModelProperty("状态（0 不可买 1可买）")
    @TableField("status")
    private Byte status;

    @ApiModelProperty("名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("描述信息")
    @TableField("`describe`")
    private String describe;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("省钱包包含的优惠卷")
    @TableField(exist = false)
    private List<CouponBatchAndLink> couponBatchList;
}
